package ModelLayer;



import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class AddressBookTest.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class AddressBookTest
{
    /**
     
     * Default constructor for test class AddressBookTest
     */
    private AddressBook addressBook;
    public AddressBookTest()
    {
    }
    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
        addressBook = AddressBook.getInstance();
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void AddressBook()
    {
        addressBook.setPerson("PersonID", "Name", "Address", "PostCode", "City", "PhoneNumber");
        java.util.ArrayList<ModelLayer.Person> arrayLis1 = addressBook.getPerson();
        assertEquals(arrayLis1, arrayLis1);
        ModelLayer.Person person1 = addressBook.findPerson("PersonID");
        assertEquals(person1, person1);
        addressBook.editPerson(person1, "NewName", "NewAddress", "NewPostCode", "NewCity", "NewPhoneNumber");
        addressBook.deletePerson("PersonID");
    }
}

